{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Jupyter Notebook常用快捷键"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 命令模式和编辑模式的切换：\n",
    "* 进入命令模式：随时输入ESC，或者鼠标点击空白区域\n",
    "* 进入编辑模式：输入回车Enter，或者鼠标点击代码框\n",
    "\n",
    "#### 命令模式常用快捷键：\n",
    "* shift+回车：运行代码块, 选择下面的代码块\n",
    "* ctrl+回车: 运行选中的代码块\n",
    "* alt+回车: 运行代码块并且插入下面\n",
    "* Y：把文本块变成代码\n",
    "* M：把代码块变成文本\n",
    "* 数字1/2/3/4/5/6：把代码块变成多级标题\n",
    "* A：在上面插入代码块\n",
    "* B：在下面插入代码块\n",
    "* C：复制选择的代码块\n",
    "* V：在单元格下方粘贴代码块\n",
    "* DD：删除选中单元格\n",
    "* Z：撤销删除\n",
    "* ctrl+s：保存文件\n",
    "\n",
    "#### 编辑模式常用快捷键：\n",
    "* shift+回车：运行代码块, 选择下面的代码块\n",
    "* ctrl+回车: 运行选中的代码块\n",
    "* alt+回车: 运行代码块并且插入下面\n",
    "* ctrl+s：保存文件"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 怎样新建字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "d = {}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "d2 = dict()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 给字典新增数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "d[\"key\"] = 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "d[\"key2\"] = 456"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 怎样遍历字典数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "key 123\n",
      "key2 456\n"
     ]
    }
   ],
   "source": [
    "for key,value in d.items():\n",
    "    print(key, value)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
